from django.contrib import admin
from donation.models import DgutOrder, DonationStatistics, Summaries

# Register your models here.
@admin.register(DgutOrder)
class DgutOrderAdmin(admin.ModelAdmin):
    list_display = ['id', 'username', 'name', 'acc_tr_type', 'acc_tr_amt', 'status', 'remarks', 'create_time']
    list_filter = ['acc_tr_type', 'status']
    search_fields = ['username', 'name']

    ordering = ('-create_time', )


@admin.register(DonationStatistics)
class DonationStatisticsAdmin(admin.ModelAdmin):
    list_display = ['username', 'name', 'times', 'amount']
    list_filter = ['times', ]
    search_fields = ['username', 'name']

    ordering = ('-amount', )


@admin.register(Summaries)
class SummariesAdmin(admin.ModelAdmin):
    list_display = ['name', 'value']
    list_filter = ['name', ]
    search_fields = ['name', ]

